package edu.pku.sei.transformation.atl.adapter;

import edu.pku.sei.modeler.model.core.MetaModelElement;
import edu.pku.sei.transformation.atl.rule.IATLModel;
import edu.pku.sei.transformation.editor.model.TypedModel;
import edu.pku.sei.transformation.editor.model.base.NamedElement;

public class ATLModelAdapter implements IATLModel {
	TypedModel model = null;

	ATLModelAdapter(TypedModel model) {
		this.model = model;
	}

	@Override
	public String getMetaModelName() {
		MetaModelElement type = model.getType();
		if (type instanceof NamedElement) {
			return ((NamedElement) type).getName();
		} else {
			return "";
		}

	}

	@Override
	public String getName() {
		return model.getName();
	}

}
